<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/WEB-INF/struts-tags.tld"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>欢迎访问产品运营互动中心！</title>
<link rel="stylesheet" href="<s:url value="/css/style_new.css"/>">
<link href="<s:url value="/images/08_ccxxzx.css"/>" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<s:url value="/script/sysOper.js"/>"></script>
<script type="text/javascript" src="<s:url value="/script/selfResize.js"/>"></script>
<script type="text/javascript" src="<s:url value="/components/datepicker/WdatePicker.js"/>"></script>
<script>
function show(url){
	window.open(url);
}
function initLoad(){
	f_iframeResize();
}
window.onload = initLoad;
</script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
<table width="980" border="0" cellspacing="0" cellpadding="0" align="center">
		<tr>
			<td>
			<table width="100%" border="0" cellpadding="0" cellspacing="0"
				background="<s:url value="/images/new/gxzl_index_2.gif"/>">
				<tr>
					<td width="20" height="32">&nbsp;</td>
					<td width="20"><img
						src="<s:url value="/images/new/dq_dot.gif"/>" width="15"
						height="12" /></td>
					<td>当前位置：新增产品需求单</td>
				</tr>
			</table>
			</td>
		</tr>
	<tr>
		<td background="<s:url value="/images/home_4a.gif"/>">
		<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
			<tr>
				<td width="20%" valign="top">
				<table width="100%" height="400"  border="0" cellspacing="0" cellpadding="0"
					align="center" bgcolor="#FFFFFF">
					<tr>
						<td valign="top" align="center">
						<s:form action="saveProdAdvReq.action" namespace="/bpm" method="post" enctype="multipart/form-data">
							<input type="hidden" name="flag" value="">
							<input type="hidden" name="prodAdvReq.id" value="${prodAdvReq.id}">
							<input type="hidden" name="prodAdvReq.tranStatus" value="${prodAdvReq.tranStatus}">
							<input type="hidden" name="prodAdvReq.name" value="${prodAdvReq.name}">
							<input type="hidden" name="prodAdvReq.reqCode" value="${prodAdvReq.reqCode}">
							<input type="hidden" name="prodAdvReq.content" value="${prodAdvReq.content}">
							<input type="hidden" name="prodAdvReq.importance.id" value="${prodAdvReq.importance.id}">
							<input type="hidden" name="prodAdvReq.type.id" value="${prodAdvReq.type.id}">
							<input type="hidden" name="prodAdvReq.startPerson.id" value="${prodAdvReq.startPerson.id}">
							<input type="hidden" name="prodAdvReq.startDept.id" value="${prodAdvReq.startDept.id}">
							<input type="hidden" name="prodAdvReq.prodPerson.id" value="${prodAdvReq.prodPerson.id}">
							<input type="hidden" name="prodAdvReq.prodDept.id" value="${prodAdvReq.prodDept.id}">
							<input type="hidden" name="prodAdvReq.relaProd" value="${prodAdvReq.relaProd}">
							<input type="hidden" name="prodAdvReq.advanTime" value="${prodAdvReq.advanTime}">
							<input type="hidden" name="prodAdvReq.relaReq" value="${prodAdvReq.relaReq}">
							<input type="hidden" name="prodAdvReq.tranReason" value="${prodAdvReq.tranReason}">
							<input type="hidden" name="prodAdvReq.verifyExplain" value="${prodAdvReq.verifyExplain}">
							<input type="hidden" name="advice" value="">
							
							
							<table width="98%" align="center" border="0" cellspacing="0" cellpadding="0">
								<br/>
								<tr>
									<td height="5">
										<table width="100%" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td width="5" height="5"><img src="<s:url value="/images/cphdzx_tab1.gif"/>" width="5" height="5" /></td>
												<td class="tdborderup"><img src="<s:url value="/images/spacer.gif"/>" width="1" height="1" /></td>
												<td width="5"><img src="<s:url value="/images/cphdzx_tab2.gif"/>" width="5" height="5" /></td>
											</tr>
										</table>
									</td>
								</tr>
								<tr>
									<td  class="tdborderleftright">
									<TABLE width="98%" cellSpacing=1 cellPadding=0 align="center">
										<TR height=30>
											<TD align=left width="10%">
												<input type="button" value="返 回" onClick="location.href='/bpm/listProdAdvReq.action'">
									<s:if test='%{prodAdvReq.tranStatus=="WAIT"}'>
										<s:if test='%{reclaim=="reclaim"}'>
												<input type="submit" value="回 退" onClick="return refuse();">
												<input type="submit" value="接 收" onClick="return pending();">
										</s:if><s:else>
												<input type="button" value="回 收" onClick="document.forms[0].action='reclaimProdAdvReq.action';document.forms[0].submit();">
										</s:else>
									</s:if>
									<s:if test='%{prodAdvReq.tranStatus=="PASS"}'>
										<s:if test='%{reclaim=="reclaim"}'>
												<input type="submit" value="流程启动" onClick="return startup();">
										</s:if>
									</s:if>
											</TD>
										</TR>
									</table><br>
									<s:if test='%{prodAdvReq.reqCode!=null}'>
										&nbsp;&nbsp;&nbsp;需求单号：${prodAdvReq.reqCode}
									</s:if>
									<table width="98%" border="0" cellspacing="0" cellpadding="7"
										align="center" class=tablecolor2>
										
                  <tr>
                    <td bgcolor="D6E3FA"><div align="right" class="STYLE2"><font color="red">*</font>需求名称：</div></td>
                    <td colspan="3">
											${prodAdvReq.name}
                    </td>
                  </tr>
                  <tr>
                    <td bgcolor="D6E3FA"><div align="right" class="STYLE2">发 起 人：</div></td>
                    <td width="286">
											${prodAdvReq.startPerson.name}
                    </td>
                    <td bgcolor="D6E3FA" width="140"><div align="right" class="STYLE2">发起部门：</div></td>
                    <td width="268">
                    	${prodAdvReq.startDept.fullName}
                    </td>
                  </tr>
                  <tr>                    
                  	<td bgcolor="D6E3FA"><div align="right" class="STYLE2">期望完成时间：</div></td>
                    <td>
												<s:date name="prodAdvReq.advanTime" format="yyyy年MM月dd日"/>
                    </td>
                    <td bgcolor="D6E3FA" width="140"><div align="right" class="STYLE2">发起时间：</div></td>
                    <td width="268">
												<s:date name="prodAdvReq.begin" format="yyyy年MM月dd日 hh:mm"/>
                    </td>
                  </tr>
					
                  <tr>
                    <td bgcolor="D6E3FA" width="140"><div align="right" class="STYLE2">产品经理：</div></td>
                    <td width="268">
											${prodAdvReq.prodPerson.name}
                    </td>
                    <td bgcolor="D6E3FA" width="140"><div align="right" class="STYLE2">产品部门：</div></td>
                    <td>
                    	${prodAdvReq.prodDept.fullName}
                    </td>
                  </tr>
                  <tr>
                    <td bgcolor="D6E3FA" width="140"><div align="right" class="STYLE2">需求类别：</div></td>
                    <td width="268">
                    	${prodAdvReq.type.name}
                    </td>
									<s:if test='%{prodAdvReq.tranStatus=="PASS"}'>
                    <td bgcolor="D6E3FA" width="140"><div align="right" class="STYLE2">重要性：</div></td>
                    <td width="268">
											${prodAdvReq.importance.name}
                    </td>
									</s:if>
									<s:else>
										<td bgcolor="D6E3FA" width="140"></td>
                    <td width="268"></td>
									</s:else>
								
								
                  </tr>
				  				<tr>
                    <td bgcolor="D6E3FA"><div align="right" class="STYLE2"><font color="red">*</font>优化内容：</div></td>
                    <td colspan="3">
											${prodAdvReq.content}
					  				</td>
                  </tr>
                  <tr> 
                    <td width="111" bgcolor="D6E3FA"> <div align="right" class="STYLE2">附&nbsp;&nbsp;&nbsp;&nbsp;件：</div></td>
                    <td colspan="3">
					<table width="90%" border="0" class=tablecolor2>
						<tr>
							<td width="40%" align="center" bgcolor="D6E3FA">附件名称</td>
							<td width="20%" align="center" bgcolor="D6E3FA">附件类型</td>
							<td width="15%" align="center" bgcolor="D6E3FA">上传人</td>
							<td width="15%" align="center" bgcolor="D6E3FA">上传时间</td>
						</tr>
						<s:iterator id="reqDocu" value="reqDocus">
						<input type="hidden" name="attachIDs" value="<s:property value="id" />"/>
						<tr>
							<td>
								<a href="<s:url value="/bpm/showDocu.action?reqDocu.id="/><s:property value="id" />"
									target="_blank">
									<s:property value="fullName" />
								</a>
							</td>
							<td align="center"> 
								<s:if test="docType==null">
									其他附件
								</s:if>	
								<s:else>
									<s:property value="docType.name"/>
								</s:else>	
							</td>
							<td align="center"> 
								<s:property value="creator"/>
							</td>
							<td align="center"> 
								<s:property value="begin"/>
							</td>
						</tr>
						</s:iterator>
					</table>
					<br>
                      </div></td>
                  </tr>

							<s:if test='%{reclaim=="reclaim"}'>
							</s:if><s:else>
              </s:else>
                  <tr>
                    <td bgcolor="D6E3FA"><div align="right" class="STYLE2">备&nbsp;&nbsp;&nbsp;&nbsp;注：</div></td>
                    <td colspan="3">
											<textarea name="prodAdvReq.remark" cols="96" rows="4" readonly>${prodAdvReq.remark}</textarea>
					  				</td>
                  </tr>
                </table>
								<s:if test="prodAdvReq.tranReason!=null">
									<table width="98%" border="0" cellspacing="0" cellpadding="7"
										align="center" class=tablecolor2>
                  <tr>
                    <td bgcolor="D6E3FA"><div align="left" class="STYLE2">办理记录</div></td>
                  </tr>
                  <tr>
                    <td colspan="3">
											${prodAdvReq.tranReason}
					  				</td>
                  </tr>
                </table>
								</s:if>	
										
									</td>
								</tr>
								<tr>
									<td height="5">
										<table width="100%" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td width="5" height="5"><img src="<s:url value="/images/cphdzx_tab3.gif"/>" width="5" height="5" /></td>
												<td class="tdborderbottom"><img src="<s:url value="/images/spacer.gif"/>" width="1" height="1" /></td>
												<td width="5"><img src="<s:url value="/images/cphdzx_tab4.gif"/>" width="5" height="5" /></td>
											</tr>
										</table>
									</td>
								</tr>
							</table></td>
					</tr>
				</table>
				</s:form> 
</body>
<script>
//验证表单
function check(){
	return true;
}

function save(){
	var uploads = document.getElementsByName("upload");
	var filetype = document.getElementsByName("filetype");
	if(uploads[0].value != null && uploads[0].value != ""){
		filetype[0].value = "PRODREQUEST";
	}else{
		filetype[0].value = "";
	}
	document.all['flag'].value="${prodAdvReq.tranStatus}";
	return check();
}
function submit1(){
	document.all['flag'].value="WAIT";
	return check();
}
function refuse(){
  var url="<s:url value='/' escapeAmp='false'/>"+"bpm/inputMessage.action";	 
  var returnData=window.showModalDialog(url,window,"status:no;dialogWidth:550px;dialogHeight:250px;scroll:yes;");
	if(returnData){
		document.forms[0]["advice"].value=returnData;
	}else{
		return false;
	}
	document.forms[0].action='refuseProdAdvReq.action';
	document.all['flag'].value="REFUSE";
	return check();
	
	
}
function pending(){
	document.all['flag'].value="PENDING";
	return check();
}
function reclaimProdAdvReq(){
	document.all['flag'].value="PASS";
	if(document.all['prodAdvReq.prodPerson.id'].value==""){
		alert("产品经理不能为空，请选择！");
		return false;
	}
	return check();
}

function startup(){
	document.forms[0].action='startupProdAdvReq.action';
	return check();
}


function isNullSel(obj){
	if(obj&&obj.options&&obj.options.selectedIndex!=-1&&obj.options[obj.options.selectedIndex].value!=""){
		return false;
	}
	return true;
}

</script>
</html>